<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>{{name}}</p>
        <p>{{address}}</p>
    </div>
</body>
<script src="dist/vue.js"></script>
<script> 
    const vm = new Vue({
        el:"#app",
        data:{
            name:'zj',
            age:26,
            address:{
              tel:'67255299'
            },
            arr:[1,2,[3]]
        },
        watch:{
            name(newVal,oldVal){
                console.log(newVal,oldVal)
            },
            'address.tel'(newVal,oldVal){
                console.log(newVal,oldVal)
            }
        }
    })

    setTimeout(()=>{
        // vm.arr.push(3)
        // vm.arr[2].push(4)
        vm.name = 'pbb'
        vm.address.tel = '15757177498'
    },2000)
</script>
</html>